package com.javadaemon.rpgengine.screens.helpers;

import org.newdawn.slick.GameContainer;
import org.newdawn.slick.Graphics;
import org.newdawn.slick.Image;
import org.newdawn.slick.SpriteSheet;

import com.javadaemon.rpgengine.util.ResourceManager;
import com.javadaemon.rpgengine.util.ResourceManager.IMAGE;


public class ImageRender extends ObjectRender {
    
    IMAGE image;
    
    public ImageRender(IMAGE image) {
	this.image = image;
    }

    public void update(GameContainer container, int delta) {

    }

    public void render(GameContainer container, Graphics g, SpriteSheet graphics, int x, int y) {
	Image objectImageToDraw = graphics.getSubImage(
		this.image.getSheetColumn(),
		this.image.getSheetRow());
	objectImageToDraw.drawEmbedded(x, y,
		ResourceManager.TILE_WIDTH,
		ResourceManager.TILE_HEIGHT);
    }
}
